package com.ly.controller;


//import com.baomidou.dynamic.datasource.annotation.DS;
import com.common.core.domain.AjaxResult;
import com.ly.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/vip")
public class VipController {

    @Autowired
    private VipService vipService;

    //@DS注解 是使用在yml文件中配置的数据源，不写默认配置的是master
//    @DS("slave")
    @GetMapping("/tmp")
    public AjaxResult test1(){
        return AjaxResult.success(vipService.queryTmp());
    }

    //@DS注解 是使用在yml文件中配置的数据源，不写默认配置的是master
//    @DS("master")
    @GetMapping("/user")
    public AjaxResult test2(){
        return AjaxResult.success(vipService.queryUser());
    }
}
